﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT092 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;

    [Description("Sequential section number")]
    public Tag202 SectionNumber_202
    {
      get
      {
        return new Tag202((SwiftElement) this, 0, (SwiftDefinitionElement) MT092.U0002);
      }
    }

    [Description("Sequential section number")]
    public Tag202 Tag202_SectionNumber
    {
      get
      {
        return this.SectionNumber_202;
      }
    }

    [Description("Total number of sections in a multi-section message.")]
    public Tag203 TotalSections_203
    {
      get
      {
        return new Tag203((SwiftElement) this, 0, (SwiftDefinitionElement) MT092.U0004);
      }
    }

    [Description("Total number of sections in a multi-section message.")]
    public Tag203 Tag203_TotalSections
    {
      get
      {
        return this.TotalSections_203;
      }
    }

    [Description("Text")]
    public MT092.Tag311 Text_311
    {
      get
      {
        return new MT092.Tag311((SwiftElement) this, 0, (SwiftDefinitionElement) MT092.U0006);
      }
    }

    [Description("Text")]
    public MT092.Tag311 Tag311_Text
    {
      get
      {
        return this.Text_311;
      }
    }

    public MT092()
      : base(true)
    {
    }

    public MT092(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT092.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT092.MessageDefinition = new SwiftMessageDefinition("MT092", "FIN Copy Message Status Report");
      MT092.U0002 = new SwiftTagDefinition("SectionNumber_202", "Sequential section number");
      MT092.U0002.TagName = "{202:";
      MT092.U0002.Mandatory = false;
      MT092.U0003 = new SwiftTagSubItemDefinition("SectionNumber", "Sequential section number");
      MT092.U0002.Elements.Add((SwiftDefinitionElement) MT092.U0003);
      MT092.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT092.U0002);
      MT092.U0004 = new SwiftTagDefinition("TotalSections_203", "Total number of sections in a multi-section message.");
      MT092.U0004.TagName = "{203:";
      MT092.U0004.Mandatory = false;
      MT092.U0005 = new SwiftTagSubItemDefinition("TotalSections", "Total number of sections in a multi-section message.");
      MT092.U0004.Elements.Add((SwiftDefinitionElement) MT092.U0005);
      MT092.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT092.U0004);
      MT092.U0006 = new SwiftTagDefinition("Text_311", "Text");
      MT092.U0006.TagName = "{311:";
      MT092.U0007 = new SwiftTagSubItemDefinition("Text", "Text");
      MT092.U0008 = new SwiftTagSubItemDefinition("Text1", "Text");
      MT092.U0007.Elements.Add((SwiftDefinitionElement) MT092.U0008);
      MT092.U000E = new SwiftTagSubItemDefinition("Text2", "Text");
      MT092.U000E.Mandatory = false;
      MT092.U0007.Elements.Add((SwiftDefinitionElement) MT092.U000E);
      MT092.U0006.Elements.Add((SwiftDefinitionElement) MT092.U0007);
      MT092.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT092.U0006);
    }

    public class Tag311 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("311", value);
        }
      }

      internal Tag311(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
